package com.test.configclient.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @program: spring-cloud-demo
 * @description: 配置中心测试
 * @author: lyr
 * @create: 2018-06-05 16:53
 **/
@Slf4j
@Component
public class ConfigClientTestServcie implements CommandLineRunner {

    @Value("${test}")
    private String value;

    @Override
    public void run(String... args) throws Exception {
        log.debug("测试配置中心取值：{}", value);
    }
}
